ποΈGitΠ―ΡΠ°ποΈ
docs/en/developer/codebase.md 4d4070c8e1ed73a56ee2f054300a0f62e3fe2e62 (4d4070c8) Text, 4.38 KB
---
title: Codebase
parent: Developer Guide
nav_order: 2
last_updated: 2026-07-08
aliases:
Tff7b72- repository-layout
Tff7b72- project-structure
Tc9d1d9 - source-code
Tc9d1d9---
Tc9d1d9# Codebase
Repository layout, namespacing conventions, and build system overview.
Tc9d1d9## Repository Structure
Ta5d6ff```
Meshtastic-Android/
βββ androidApp/ # Android application module
β βββ src/main/ # Shared Android code
β βββ src/google/ # Google Play flavor (Gemini, proprietary)
β βββ src/fdroid/ # F-Droid flavor (FOSS-only)
βββ desktopApp/ # Desktop JVM application
βββ feature/ # Feature modules (KMP)
β βββ intro/
β βββ messaging/
β βββ connections/
β βββ map/
β βββ node/
β βββ settings/
β βββ firmware/
β βββ docs/
β βββ wifi-provision/
β βββ widget/
β βββ discovery/
β βββ car/
βββ core/ # Core infrastructure modules (KMP)
β βββ barcode/
β βββ ble/
β βββ common/
β βββ data/
β βββ database/
β βββ datastore/
β βββ di/
β βββ domain/
β βββ konsist/
β βββ model/
β βββ navigation/
β βββ network/
β βββ nfc/
β βββ prefs/
β βββ repository/
β βββ resources/
β βββ service/
β βββ takserver/
β βββ testing/
β βββ ui/
βββ baselineprofile/ # Baseline Profile generation for :androidApp
βββ screenshot-tests/ # Compose Preview screenshot tests (visual-regression gate)
βββ docs-screenshots/ # Doc-framed composition screenshots (generate-only, not CI-gated)
βββ build-logic/ # Convention plugins and build helpers
β βββ convention/
βββ docs/ # Documentation source (markdown)
β βββ en/ # English source; other locales live under docs/<locale>/user/
β βββ user/
β βββ developer/
βββ gradle/ # Gradle wrapper and version catalog
β βββ libs.versions.toml
βββ specs/ # Feature specifications
βββ .github/workflows/ # CI/CD workflows
```
Tc9d1d9## Namespacing Convention
All Kotlin packages follow the pattern:
Ta5d6ff```
org.meshtastic.{layer}.{module}.{subpackage}
```
Examples:
Tff7b72- Ta5d6ff`org.meshtastic.core.navigation` β core navigation module
Tff7b72- Ta5d6ff`org.meshtastic.feature.docs.ui` β docs feature UI package
Tff7b72- Ta5d6ff`org.meshtastic.app.di` β app DI configuration
Tc9d1d9## Build System
Tc9d1d9### Gradle Kotlin DSL
All build files use Kotlin DSL (Ta5d6ff`.gradle.kts`). Configuration:
Tff7b72- **Version catalog:** Ta5d6ff`gradle/libs.versions.toml`
Tff7b72- **Convention plugins:** Ta5d6ff`build-logic/convention/`
Tff7b72- **Settings:** Ta5d6ff`settings.gradle.kts`
Tc9d1d9### Convention Plugins
Located in Ta5d6ff`build-logic/convention/src/main/kotlin/`:
| Plugin | Purpose |
|--------|---------|
| Ta5d6ff`meshtastic.kmp.feature` | Standard feature module setup |
| Ta5d6ff`meshtastic.kmp.jvm.android` | JVM + Android target configuration |
| Ta5d6ff`meshtastic.kotlinx.serialization` | Serialization plugin setup |
Tc9d1d9### Build Variants (Android)
| Flavor | Description |
|--------|-------------|
| Ta5d6ff`google` | Google Play distribution; includes proprietary APIs |
| Ta5d6ff`fdroid` | F-Droid distribution; FOSS-only dependencies |
Tc9d1d9### Key Gradle Tasks
Ta5d6ff```Ta5d6ffbash
T8b949e# Compile check across all KMP targets
./gradlew kmpSmokeCompile
T8b949e# Run all tests
./gradlew allTests
T8b949e# Code quality
./gradlew spotlessCheck detekt
T8b949e# Android build
./gradlew assembleGoogleDebug assembleFdroidDebug
T8b949e# Desktop run
./gradlew :desktopApp:run
T8b949e# Desktop native installers for the current OS (DMG / MSI+EXE / DEB+RPM+AppImage)
./gradlew :desktopApp:packageReleaseDistributionForCurrentOS
T8b949e# API reference (Dokka HTML β build/dokka/html)
./gradlew dokkaGeneratePublicationHtml
Ta5d6ff```
Tc9d1d9## Version Catalog Highlights
Key dependencies in Ta5d6ff`gradle/libs.versions.toml`:
| Category | Library |
|----------|---------|
| Compose | Compose Multiplatform (JetBrains) |
| Navigation | Navigation 3 |
| DI | Koin (annotations) |
| Serialization | kotlinx.serialization |
| Database | Room KMP |
| Networking | Ktor |
| Markdown | multiplatform-markdown-renderer |
| Testing | kotlin-test, compose-ui-test |
---
Served by rngit 1.5.0 - Generated in 0.05s